package com.ms.p2p.provider.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.ms.p2p.bean.PageBean;
import com.ms.p2p.entity.account.Account;
import com.ms.p2p.entity.account.AccountBank;
import com.ms.p2p.entity.member.Auth;
import com.ms.p2p.provider.MemberAccountBankProvider;
import com.ms.p2p.service.impl.MemberAccountBankServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.Map;

/**
 * Created by daimajia on 2015/4/19 添加dubbo接口.
 */
@Service
public class MemberAccountBankProviderImpl implements MemberAccountBankProvider {
    @Autowired
    MemberAccountBankServiceImpl memberAccountBankService;


    public AccountBank findByUserId(int userId) {
        return memberAccountBankService.findByUserId(userId);
    }

    public int insert(AccountBank bank) {
        return memberAccountBankService.insert(bank);
    }

    public int updateByUserId(AccountBank bank) {
        return memberAccountBankService.updateByUserId(bank);
    }

    public List<Map<String, Object>> findPager(String userId, String userName, PageBean page) {
        return memberAccountBankService.findPager(userId,userName,page);
    }

    public List<Map<String, Object>> findAll(String userId, String userName) {
        return memberAccountBankService.findAll(userId,userName);
    }

    public int findCount(String userId, String userName) {
        return memberAccountBankService.findCount(userId,userName);
    }

    public Auth selectRealByUserId(int user_id) {
        return memberAccountBankService.selectRealByUserId(user_id);
    }

    public AccountBank selectMrAccountBankByUserId(int user_id) {
        return memberAccountBankService.selectMrAccountBankByUserId(user_id);
    }

    public Account selectAccountByUserId(int user_id) {
        return memberAccountBankService.selectAccountByUserId(user_id);
    }

    public AccountBank selectAccountBankByUserId(int user_id) {
        return memberAccountBankService.selectAccountBankByUserId(user_id);
    }

    public AccountBank selectAccountBankById(String id) {
        return memberAccountBankService.selectAccountBankById(id);
    }

    public int inserted(AccountBank bank, String paypassword, int id, String bankId) {
        return memberAccountBankService.inserted(bank,paypassword,id,bankId);
    }

    public void delete(Integer bank_id) {
         memberAccountBankService.delete(bank_id);
    }
}
